﻿Imports SuporteRepository
Imports SuporteModel
Public Class LojaService

    Private lojadb As ILoja = New ProvLojaDAO(ConnectionFactory.GetConnection())

    Public Function CadastrarLoja(ByVal parLoja As Loja) As Boolean
        Return lojadb.CadastrarLoja(parLoja)
    End Function

    Public Function ListarLojasPorCliente(ByVal parIdCliente As Integer) As List(Of Loja)
        Return lojadb.BuscarLojaPorCliente(parIdCliente)
    End Function

    Public Function ExclirLoja(ByVal parIdLoja As Integer) As Boolean
        Return lojadb.ExcluirLoja(parIdLoja)
    End Function

    Public Function AtualizarLoja(ByVal parIdLoja As Integer, ByVal parLojaNova As Loja) As Boolean
        Return lojadb.AtualizarLoja(parIdLoja, parLojaNova)
    End Function

    Public Function ListarLojas() As List(Of Loja)
        Return lojadb.ListarLojas()
    End Function
End Class
